LibRaw 0.21 Release is just published in our Github repository and this site download section.
LibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED3 if compiled w/ RawSpeed-v3 support
If file was processed (or tried to process) via RawSpeed-v3, these bits are rised in imgdata.process_warnings:
LibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED_BITS if compiled with this flag.
If enabled: imgdata.rawparams.use_rawspeed becomes bit-field (instead of 0/1 off/on) with bits:
Changes are:
Camera format support
- Phase One/Leaf IIQ-S v2 support
- Canon CR3 filmrolls/RawBurst
- Canon CRM (movie) files
- Tiled bit-packed (and 16-bit unpacked) DNGs
- (non-standard) Deflate-compressed integer DNG files are allowed
Camera support
- Canon EOS R3, R7 and R10
- Fujifilm X-H2S, X-T30 II
- OM System OM-1
- Leica M11
- Sony A7-IV (ILCE-7M4)
- DJI Mavic 3
- Nikon Z9: standard compression formats only
Multiple (resultion) thumbnails support
- New imgdata.thumbs_list data item with data fields:
-
int thumbcount: thumbnail count
libraw_thumbnail_item_t thumblist[LIBRAW_THUMBNAIL_MAXCOUNT]: list of thumbnails
libraw_thumbnail_item_t fields:
enum LibRaw_internal_thumbnail_formats tformat: internal thumbnail format (this is not PPM/JPEG, but internal type related to thumbnail reading/unpacking method)
ushort twidth, theight: thumbnail image size.
ushort tflip: image rotation (see notes below)
unsigned tlength: on-disk data size (not uncompressed for compressed formats)
unsigned tmisc: bit depth and channel count: (color << 5) | bitsperpixel
INT64 toffset: Thumbnail data offset in file
- Only TIFF-based and CR3 files are parsed for thumbnail list, other formats will have thumbcount = 1 (or 0 if no thumbnail found in file).
- Thumbnail image size may be unknown (not recorded in metadata), in this case twidth and theight are zero. Usually small(er) thumbnails will always have twidth/theight filled, while largest one may have these fields set to zero.
- Thumbnail rotation (tflip) is filled only for TIFF-based RAWs (if Orientation tag is not present in IFD, default zero value is used) For non-tiff images, tflip is initialized to 0xffff (not known...)
- There is no code to select thumbnail based on some criteria (e.g. minimal resolution), it is left to user to implement such a criteria, if needed (see unpack_thumb_ex() call below)
- If you want to get largest possible thumbnail: just use old unpack_thumb() call to get it.
- new API call: LibRaw::unpack_thumb_ex(int i): Unpacks i-th thumbnail if it exists into imgdata.thumbnail structure i should be non-zero and less then imgdata.thumbs_list.thumbcount.
- samples/simple_dcraw.cpp: new -E command line switch to extract all thumbnails from input file(s)
(Experimental) RawSpeed "version 3" (develop branch) support
Build with -DUSE_RAWSPEED3, see details in RawSpeed3/README.mdLibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED3 if compiled w/ RawSpeed-v3 support
If file was processed (or tried to process) via RawSpeed-v3, these bits are rised in imgdata.process_warnings:
- LIBRAW_WARN_RAWSPEED3_PROCESSED - processed via RawSpeed v3
- LIBRAW_WARN_RAWSPEED3_PROBLEM - not processed (due to exception in RawSpeed library)
- LIBRAW_WARN_RAWSPEED3_UNSUPPORTED - unsupported file
- LIBRAW_WARN_RAWSPEED3_NOTLISTED - file not listed in cameras.xml data
- lossless jpeg decoder
- Canon sRAW decoder
- lossless compressed and packed-compressed DNG decoders
- Pentax decoder
- Nikon (compressed) decoder
- Phase One Compressed and Hasselblad/Compressed decoders
- bitpacked decoder
- Panasonic (old 12-bit compression) decoder
- Olympus decoder
- Sony ARW (v1 and v2) decoders
- Samsung (version 1) decoder
(Experimental) Fine control of RawSpeed version selection/use
To enable, build LibRaw with -DUSE_RAWSPEED_BITSLibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED_BITS if compiled with this flag.
If enabled: imgdata.rawparams.use_rawspeed becomes bit-field (instead of 0/1 off/on) with bits:
- LIBRAW_RAWSPEEDV1_USE - use RawSpeed Version 1 (if compiled with)
- LIBRAW_RAWSPEEDV1_FAILONUNKNOWN - do not process unknown files (not listed in RawSpeed v1 camera definitions file)
- LIBRAW_RAWSPEEDV1_IGNOREERRORS - ignore mirror decoding errors (out of range data,etc)
- LIBRAW_RAWSPEEDV3_USE - Use RawSpeed Version 3 (if compiled with)
- LIBRAW_RAWSPEEDV3_FAILONUNKNOWN - do not process unknown files
- LIBRAW_RAWSPEEDV3_IGNOREERRORS - ignore minor decoding errors
Misc changes/improvements
- New compile time define LIBRAW_OWN_SWAB to use on platforms without swab() in C/C++ runtime
- New imgdata.rawparams.options bit: LIBRAW_RAWOPTIONS_CANON_IGNORE_MAKERNOTES_ROTATION
If set: image orientation is set based on TIFF/IFD0:Orientation tag, makernotes orientation data is ignored - Nikon makernotes: read NEFCompression tag for HE/HE* files
- Nikon orientation tag: more fixed offsets for known cameras
- Adobe DNG SDK 1.6 support (meaning, just an additional patch for GPR SDK)
- Removed LibRaw::memerr(), memory allocation failures are already handled in LibRaw_memmgr::*alloc w/ exception thrown
- Removed memory error callback, out-of-memory error should be handled via returned error code check, all related parameters (e.g. LibRaw constructor option to not set such callback) is also removed
- imgdata.params.adjust_maximum_thr is settable via C-API libraw_set_adjust_maximum_thr(..)
- New rawoptions/processing flags for DNG processing if compiled
with Adobe DNG SDK:
LIBRAW_RAWOPTIONS_DNG_STAGE2_IFPRESENT,LIBRAW_RAWOPTIONS_DNG_STAGE3_IFPRESENT If these flag(s) are set: Stage2/Stage3 processing will be performed only if OpcodeList2/OpcodeList3 tags are present in the input DNG file Old (hard) flags (LIBRAW_RAWOPTIONS_DNG_STAGE2 and LIBRAW_RAWOPTIONS_DNG_STAGE3) are not removed and will force Stage2/3 processing if set (regardless of input file tags) - New imgdata.rawparams.options bit: LIBRAW_RAWOPTIONS_DNG_ADD_MASKS If set: DNG Transparency Masks will be extracted (if selected via shot_select)
- New decoder flag: LIBRAW_DECODER_UNSUPPORTED_FORMAT
Bugs fixed
- Fixed possible out-of-buffer read in Nikon orientation tag parser
- Windows datastream: fixed logic errors (not showing up in real life)
- Out-of-range read-only array access in postprocessing if output_color is set to 0 (raw color)
- Minolta Z2 was not recognized correctly on 32-bit systems
- Fixed possible buffer overflow in Kodak C330 decoder
- dcraw_process(): check for buffer allocation results to avoid NULL deref
Recent comments